import Http from "../Http";
import {stringify} from "qs";

// 留言 增删改查
export default {
    // 医生回复
    doctorCreate(data) {
        return Http.post("/mms/doctorReply", stringify(data))
    },
    // 医生查询患者给自己的所有留言
    doctorLists(doctorCode) {
        return Http.get(`/mms/question/getAllReplyByDoctorCode/${doctorCode}`)
    },
    // 删除留言
    destroy(id) {
        return Http.delete(`/mms/question/${id}`)
    },
    // 删除回复
    destroyReply(id) {
        return Http.delete(`/mms/doctorReply/${id}`)
    },
    // 患者留言
    patientCreate(data) {
        return Http.post("/mms/question", stringify(data))
    },
    // 根据患者code查询患者所有的留言
    patientLists(patientCode) {
        return Http.get(`/mms/question/getAllQuestion/${patientCode}`)
    },

}
